package com.gxkj.drm.dao;


import com.gxkj.drm.entitys.Cluster;
import com.gxkj.drm.entitys.ResourceManage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 配置管理dao
 * @author shaoxiangfei
 *
 */
public interface ResourceManageDao {

    public int updateResourceManageOldAttributeValue(ResourceManage rm);

    public List<ResourceManage> getResourceIpList();

    public int deleteResourceByIp(String cluster, String ip);

    public int batchInsertResource(List<ResourceManage> resourceManageList);

    public int batchDeleteResource(List<Long> resourceManageIdList);

    public List<ResourceManage> getResourceManageByIp(String cluster, String ip);

    public List<ResourceManage> getResourceManageByFullIp(String cluster, String ip);

    public List<ResourceManage> getResourceManageByAttribute(String cluster, String attribute);

    public ResourceManage getResourceManageById(long id);

    // 获取资源的
    List<ResourceManage> getResourceManageByClusterList(List<String> clusterList);

    // 根据参数查询
    List<ResourceManage> getResourceManageByParams(@Param("cluster") List<String> cluster, @Param("ip") String ip, @Param("attribute") String attribute);

    // 获取集群名称列表
    List<String> getClusterList();

    // 获取集群信息
    List<Cluster> getClusterInfo();

    // 通过集群名称获取集群信息
    List<Cluster> getClusterInfoByCluster(List<String> clusters);
}
